package com.bytedance.common.plugin.interfaces.pushmanager.client;

import android.content.Context;

import com.bytedance.common.plugin.faces.LiteProxy;
import com.bytedance.common.utility.Logger;

public class SsRedbadgeManager {
    private static final String TAG = "SsRedbadgeManager";
    private Context mContext;
    public static SsRedbadgeManager sRedabadgeManager;

    private SsRedbadgeManager(Context arg2) {
        this.mContext = arg2.getApplicationContext();
    }

    public void applyRedbageCount(int arg3) {
        LiteProxy.inst().applyRedbageCount(this.mContext, arg3);
    }

    public static SsRedbadgeManager inst(Context arg2) {
        SsRedbadgeManager v0_1;
        synchronized (SsRedbadgeManager.class) {
            if (SsRedbadgeManager.sRedabadgeManager == null) {
                SsRedbadgeManager.sRedabadgeManager = new SsRedbadgeManager(arg2);
            }
            v0_1 = SsRedbadgeManager.sRedabadgeManager;
        }
        return v0_1;
    }

    public void onLogConfigUpdate() {
        Logger.d("SsRedbadgeManager", "onLogConfigUpdate() called");
        LiteProxy.inst().onLogConfigUpdate(this.mContext);
    }

    public void onPause() {
        Logger.d("SsRedbadgeManager", "onPause() called");
        LiteProxy.inst().onPause(this.mContext);
    }

    public void onResume() {
        Logger.d("SsRedbadgeManager", "onResume() called");
        LiteProxy.inst().onResume(this.mContext);
    }

    public void removeRedbageCount() {
        this.applyRedbageCount(0);
    }
}

